package models

import (
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Phone    string `gorm:"type:char(11)"`
	Password string `gorm:"type:varchar(50)"`
	Nickname string `gorm:"type:varchar(20)"`
}

type Good struct {
	gorm.Model
	Title   string `gorm:"type:varchar(20)"`
	Content string `gorm:"type:text"`
	Picture string `gorm:"type:varchar(255)"`
}

type Order struct {
	gorm.Model
	Uid     int    `gorm:"type:int(11)"`
	Gid     int    `gorm:"type:int(11)"`
	Status  int    `gorm:"type:int(11)"`
	Remark  string `gorm:"type:varchar(255)"`
	OrderNo string `gorm:"type:varchar(255)"`
}

type OrderList struct {
	gorm.Model
	List      []Order `json:"list"`
	Page      int     `json:"page"`
	Size      int     `json:"size"`
	TotalPage int     `json:"totalPage"`
}
